package com.iims.market.vo;

import com.iims.common.utils.SecurityUtils;
import com.iims.common.vo.GroupSearchBase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 常规按钮搜索参数
 *
 * @author fanpei
 * @date 2021/7/12 15:51
 */
@ApiModel("合同分组搜索参数")
@Data
public class GroupContractSearchQuery extends GroupSearchBase {

    @ApiModelProperty(value = "范围搜索:显示和值来源于字典数据business_contract_searchScopeData", required = true)
    private int scopeValue = -1;

    @ApiModelProperty(value = "状态/类型搜索:显示和值来源于字典数据business_contract_searchStatus", required = true)
    private int typeValue = -1;

    @Override
    public void initCurrentUser() {
        /**
         * 设置用户user_code
         */
        if (scopeValue == 0) {
            currentUser = SecurityUtils.getLoginUser().getUser().getUser_code();
        }
    }
}
